package br.com.lambdacore.iterator;

import java.util.Collection;

public class Range {

	public static Iterable<Integer> range(Collection<?> end) {
		return range(0, end);
	}

	public static Iterable<Integer> range(int end) {
		return range(0, end);
	}

	public static Iterable<Integer> range(int start, Collection<?> end) {
		return new IntegerRange(start, end.size());
	}

	public static Iterable<Integer> range(int start, int end) {
		return new IntegerRange(start, end);
	}

	public static Iterable<Integer> range(int start, Object[] end) {
		return new IntegerRange(start, end.length);
	}

	public static Iterable<Long> range(long end) {
		return range(0, end);
	}

	public static Iterable<Long> range(long start, long end) {
		return new LongRange(start, end);
	}

	public static Iterable<Integer> range(Object[] end) {
		return range(0, end);
	}

}
